package com.adam.springsecurity;

import org.springframework.security.access.annotation.Secured;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Secured("ROLE_ADMIN")
@RequestMapping("/admin")
public class AdminController {

    @RequestMapping("/hello")
    public String hello() {
        return "hello";
    }

}
